export default (url,data) => {
  //加载中
  uni.showLoading({
    title: "加载中",
  });
  return new Promise((resolve, reject) => {
    wx.request({
     url:`https://czb.ccstay.com/${url}`,
     data:data,
      success(res) {
        resolve(res.data);
      },
      fail(err) {
        reject(err);
      },
      complete() {
        uni.hideLoading();
      },
    });
  });
};
